<html>
<head><meta charset="utf-8"><title>using local compiler with other projects · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/using.20local.20compiler.20with.20other.20projects.html">using local compiler with other projects</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="170844097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/using%20local%20compiler%20with%20other%20projects/near/170844097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/using.20local.20compiler.20with.20other.20projects.html#170844097">(Jul 14 2019 at 18:52)</a>:</h4>
<p>I'm currently looking at <a href="https://github.com/rust-lang/rust/issues/61963" target="_blank" title="https://github.com/rust-lang/rust/issues/61963">#61963</a>. I'm able to reproduce with the repository using the commit that was reported but I've been unable to produce a smaller reproduction based on what I'm observing the code do (I've looked at what the macro expands to, and can see the code that the lint would trigger for, but any macros that I write aren't doing it). I'm now trying to use a local build of the compiler so I can debug what's triggering it and work back from that to make a test case. However, if I use <code>rustup toolchain link rust1-stage1 /path/to/stage1/folder</code> and then change the <code>rust-toolchain</code> file,  eventually I get an error like this:</p>
<div class="codehilite"><pre><span></span>error: librustc_plugin-4f4ec7f541bc84cb.so: cannot open shared object file: No such file or directory
  --&gt; components/script/lib.rs:15:11
   |
15 | #![plugin(script_plugins)]
   |           ^^^^^^^^^^^^^^
</pre></div>


<p>I can work around it by adding <code>/path/to/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib</code> (where this file lives) to <code>LD_PRELOAD_PATH</code>, but then I immediately hit <code>cannot access a scoped thread local variable without calling `set` first</code>. Anyone got any ideas on what to try?</p>



<a name="170853164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/using%20local%20compiler%20with%20other%20projects/near/170853164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/using.20local.20compiler.20with.20other.20projects.html#170853164">(Jul 14 2019 at 23:11)</a>:</h4>
<p>Legacy plugins require a <code>stage2</code> toolchain.</p>



<a name="170853169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/using%20local%20compiler%20with%20other%20projects/near/170853169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/using.20local.20compiler.20with.20other.20projects.html#170853169">(Jul 14 2019 at 23:11)</a>:</h4>
<p>(Not so long ago even stable proc macros required it.)</p>



<a name="170869887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/using%20local%20compiler%20with%20other%20projects/near/170869887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/using.20local.20compiler.20with.20other.20projects.html#170869887">(Jul 15 2019 at 07:20)</a>:</h4>
<p>Ah, thanks! I’ll give that a go.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>